hello everygone, I am use to @botpress/webchat npm by React js, but when I try to connect my chatbot with the Client id that the panel gives me it tells me the following
code: 404
id: "err_20240529130516x0E953D57"
message: "User \"user_01HZ26NCJGQZSARMZCBA7EP8KB\" does not exist"
type: "ResourceNotFound"
import React, { useEffect, useState } from 'react';
import { getClient, Webchat, WebchatProvider } from '@botpress/webchat';
import { buildTheme } from '@botpress/webchat-generator';
const { style, theme } = buildTheme({
themeName: 'prism',
themeColor: '#634433',
});
const clientId = '3668c1c3-46e3-49e6-b081-841963624347';
function ProfessionalAssistant() {
const client = getClient({ clientId });
const [connectionError, setConnectionError] = useState(false);
useEffect(() => {
const checkConnection = async () => {
try {
await client.connect();
console.log('Connected successfully');
setConnectionError(false);
} catch (error) {
console.error('Connection error:', error);
setConnectionError(true);
}
};
checkConnection();
client.on('disconnected', () => {
console.warn('Client disconnected');
setConnectionError(true);
});
client.on('connected', () => {
console.log('Client reconnected');
setConnectionError(false);
});
}, [client]);
return (
{style}
{connectionError ? (
There was an error connecting to the server. Please check your
internet connection and try again.
) : (
)}
);
}
export default ProfessionalAssistant;
https://cdn.discordapp.com/attachments/1121494527727902891/1245367208209551433/image.png?ex=66587e18&is=66572c98&hm=59ebf58c089d60fe6e373db35cefa913ef700a0cd000c8c99a114efd2f4d5f07&